home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
SHELLS
/
SZ2
/
APROGRAM.DOC
< prev
next >
Wrap
Text File
|
1992-08-31
|
4KB
|
113 lines
******************
GENERATED PROGRAMS
******************
To get a better understanding of why & how SHAZAM organizes program
files, take a look at the diagrams below. Note how SHAZAM's main
screen simulates file organization of these elements. (You can
control whether files are loaded using the SETUP|IDE dialog.)
Organizing Software | Example SHAZAM screen
----------------------------------+----------------------
┌──────┐┌─────────┐┌────────┐ | ┌─INC─┐┌─VIR─┐┌─EVT─┐
│ CODE ││ ││ │ | │ ││ ││ │
│ & ││ METHODS ││ EVENTS │ | │ ┌───TXT───┐ │
│ DATA ││ ││ │ | └────│ │────┘
└───┬──┘└─────┬───┘└───┬────┘ | ╔════════DEF════════╗
└─────────┼────────┘ | ║ ║
╔══════╧══════╗ | ║ ║
║ APPLICATION ║ | ╚═══════════════════╝
╟─────────────╢ | (dialogs not shown)
║ DIALOGS ║ |
╟─────────────╢ |
║ HELP ║ |
╚══════╤══════╝ |
▐▀▀▀▀▀▀▀▀▀▌ |
▐ PROGRAM ▌ |
▐▄▄▄▄▄▄▄▄▄▌ |
---------------------------------------------------------
Program *.EXE - Executable file
Overlays *.OVR - Code
Resources *.REZ - Visible "FrameWork"
Help *.HLP - Information
Initialization *_I.TPU - startup overlays, resources & memory
Program *_U.TPU - main procedure (unitized)
Child Processes *.$$$ - Swapfile (best when unitized)
All Turbo Vision software has, or can have, these elements in common.
SHAZAM makes it easy for you to use, or not to use, a particular one.
Suppose you decide to overlay a program. Normally, you'd have to
make a list of UNITS which can be overlaid, create overlay startup
code, check for the presence of the *.OVR file, etc.
It's a just a little easier to do this...
C:>shazam myprog/m/o+
...to re-generate and re-compile an overlaid version, or this...
C:>shazam myprog/m/o-
...for a NON-overlaid version.
Likewise, suppose you decide to get into resources. Now, if you
start making changes to cmXX and hcXX, you're talking WORK. That's
because the resource, once generated, has the OLD values you used.
If you change Help Text, or a cmXX symbol, the main program has the
new value but the RESOURCE DOES NOT!
It might just be easier to do this...
C:>shazam myprog/m/2
...for a resource version, and this...
C:>shazam myprog/m/1
...to get back to the code version.
Using SHAZAM, you can be assured that resource and program symbols
are synchronized, since everything is freshly generated, including
dialogs. hcXX symbols for resourced dialogs (*.DLG) are
automatically updated by SHAZAM during the generate process.
You may run into problems (such as logic bugs) when switching from a
"code" to a "resourced" program. With SHAZAM, you can quickly
re-generate the program either way. ("I didn't have that bug before
using resources!")
***************
GENERATED UNITS
***************
Your program and its units can use the Initialization and Help
Symbols units. This way, you can let SHAZAM and the Help Compiler
create all cmXX, hcXX and kbCtrl? symbols needed by the program.
(You can reserve symbols names using the [ INTERNAL ] and [ VALUE ]
keywords.)
SAMPLE_I.PAS - Initialization unit
------------
Contains the cmXX and kbCtrl? symbols. In addition, startup code for
resources and overlays (if used) is in this unit. It may not be
overlaid. This unit is generated for each program.
SAMPLE_X.PAS - Help Symbols unit
------------
Help Context symbols, created by Help Compiler.
SAMPLE_U.PAS - Program unit (encapsulated)
------------
For Swap-To-Disk capability with minimum overhead, a program should
be "unitized/encapsulated" (per ExecSWAP.DOC). If the unitize switch
is active ("/U+"), this unit is created in addition to the main
program. It contains a single procedure, named "GO", which is called
by the main program. If overlays are active, this unit is overlaid.